﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Studio.Foundation.ImageBox
{
    public class Captcha
    {
        public static Bitmap CreateImage(string text, Size imageSize, Font font, Color fontColor)
        {
            Bitmap image = new Bitmap(imageSize.Width, imageSize.Height);
            using (Graphics g = Graphics.FromImage(image))
            using (Brush brush = new SolidBrush(fontColor))
            {
                g.DrawString(text, font, brush, new PointF(0, 0));
            }
            return image;
        }
    }
}
